<template>
	<div class="contain_main">
		<table border="0" cellspacing="0" cellpadding="0" class="table1">
			<thead>
				<tr>
					<th>期号</th>
					<th>万</th>
					<th>千</th>
					<th>百</th>
					<th>十</th>
					<th>个</th>
					<th>龙虎</th>
					<th>前三</th>
					<th>中三</th>
					<th>后三</th>
					<th>总和值</th>
				</tr>
			</thead>
		</table>
		<table border="0" cellspacing="0" cellpadding="0" class="contain_main_id">
			<tr v-for="(item,index) in data">
				<td>{{item.nper}}</td>
		<!--		<td :class="{ 'has-color': defaultPlayIsBig && item.ten_thousands >= 5 || !defaultPlayIsBig && item.ten_thousands < 5 }">{{ item.ten_thousands }}</td>-->
				<td }}</td>
				<td >{{ item.thousands }}</td>
				<td :class="{ 'has-color': defaultPlayIsBig && item.hundreds >= 5 || !defaultPlayIsBig && item.hundreds < 5 }">{{ item.hundreds }}</td>
				<td :class="{ 'has-color': defaultPlayIsBig && item.tens >= 5 || !defaultPlayIsBig && item.tens < 5 }">{{ item.tens }}</td>
				<td :class="{ 'has-color': defaultPlayIsBig && item.units >= 5 || !defaultPlayIsBig && item.units < 5 }">{{ item.units }}</td>
				<td>{{item.tiger}}</td>
				<td>{{item.top}}</td>
				<td>{{item.middle}}</td>
				<td>{{item.latter}}</td>
				<td>{{item.sum}}</td>
				<td>{{item.odd}}</td>
				<td>{{item.big}}</td>
			</tr>
		</table>
	</div>
</template>

<script>
	export default {
		 opposite: ["info"],
		data() {
			return {
				defaultPlayIsBig: true, // true 为大，false 为小
				data: []
			}
		},
		//   渲染之前请求  开奖号码
		created() {
			this.http
				.get("/api/statistical/data")
				.then(res => {
					console.log(res)
					if(res.status_code == 200) {
						this.data = res.data
					} else {
						this.$toasted.error(res.message).goAway(1000);
					}
				})
		},
	}
</script>

<style>
	.has-color {
		background-color: red;
		color: #fff;
	}
</style>